Location = {}
Location.mt = { __index = Location }
setmetatable(Location, Location.mt)

function Location.initialize(id, type)

	local LOCATION_t = {}
	
	if id then LOCATION_t.id = id 
	else print("LOCATION ERROR: NO ID"); return nil end
	
	if type then LOCATION_t.type = type
	else print("LOCATION ERROR: NO TYPE"); return nil end
	
	LOCATION_t.loc_types = {
		["space_station"] = function() 
			print("LOCATION space_station")
		end, --add stuff
		
		["planet"] = function() 
			print("LOCATION planet")
		end, --add stuff
		
		["empty_space"] = function() 
			print("LOCATION empty_space")
		end, --add stuff
		
		["ship"] = function() 
			print("LOCATION ship")
		end, --add stuff
		
		["asteroid"] = function() 
			print("LOCATION asteroid")
		end, --add stuff
	
	}
	
	if not LOCATION_t.loc_types[type] then 
		print("LOCATION ERROR: INVALID TYPE")
		return nil 
	else
		LOCATION_t.loc_types[type]()
	end
	
	
	
	return LOCATION_t

end


function Location.new(id, type)

	local o = Location.initialize(id, type)

	return o

end



return Location